#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <list>
#include <algorithm>
#include "list.h"
using namespace std;

int main()
{
	bit::List<int> lt1;
	lt1.push_back(1);
	lt1.push_back(3);
	lt1.push_front(5);
	lt1.push_front(5);
	lt1.push_front(5);
	lt1.push_front(4);
	//4 5 5 5 1 3
	bit::List<int>::iterator it1 = lt1.begin();
	while (it1 != lt1.end())
	{
		cout << *it1 << " ";
		it1++;
	}
	cout << endl;

	lt1.pop_back();
	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	lt1.pop_front();
	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	bit::List<int> lt2(lt1);
	for (auto e : lt2)
	{
		cout << e << " ";
	}
	cout << endl;

	bit::List<int> lt3(10, 2);
	lt3 = lt2;
	for (auto e : lt2)
	{
		cout << e << " ";
	}
	cout << endl;
	return 0;
}


//int main()
//{
//	bit::List<int> lt1;
//	lt1.push_back(1);
//	lt1.push_back(1);
//	lt1.push_back(1);
//	lt1.push_back(1);
//	bit::List<int>::iterator it1 = lt1.begin();
//	while (it1 != lt1.end())
//	{
//		cout << *it1 << " ";
//		++it1;
//	}
//	cout << endl;
//
//	const bit::List<int> lt2(10, 1);
//	bit::List<int>::const_iterator it2 = lt2.begin();
//	while (it2 != lt2.end())
//	{
//		cout << *it2 << " ";
//		++it2;
//	}
//	cout << endl;
//	return 0;
//}

